package work20241207_chap8.l;

/**
 * @author zdl
 * @date 2024/12/7
 */
public class Bolo implements Weapon{
    private Soldier soldier;
    @Override
    public void setSoldier(Soldier s) {
        this.soldier = s;
    }

    @Override
    public int fire() {

        if (soldier.getAge() >= 18){
            return 100;
        }
        return 50;
    }
}
